package org.linuxsogood.boot.serviceloader;

import java.util.Iterator;
import java.util.ServiceLoader;

/**
 * @author honway.liu
 * @date 2018/8/17 下午8:13
 * @email gm100861@gmail.com
 * @blog http://linuxsogood.org
 */
public class TestServiceLoader {
    public static void main(String[] args) {
        ServiceLoader<IService> load = ServiceLoader.load(IService.class);
        Iterator<IService> iterator = load.iterator();
        while (iterator.hasNext()) {
            iterator.next();
        }
    }
}
